package com.project.ServiceImp;


import com.alibaba.dubbo.config.annotation.Service;
import com.project.mapper.DrugSalesMapper;
import com.sun.javafx.collections.MappingChange;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import wt.DrugSalesService;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service (interfaceClass = DrugSalesService.class)
@Component
@Transactional
public class DrugSalesServiceImpl implements DrugSalesService {
    @Resource
    DrugSalesMapper mapper;
    @Override
    public List<Map<String, Object>> getDrug(String medicines_class,String create_time,String create_tim) {
        Map<String, Object> map = new HashMap<>();
        map.put("medicines_class",medicines_class);
        map.put("create_time",create_time);
        map.put("create_tim",create_tim);
        return mapper.getDrug(map);
    }

    @Override
    public List<Map<String, Object>> Drugranking(String medicines_class,String create_time,String create_tim) {
        Map<String, Object> map = new HashMap<>();
        map.put("medicines_class",medicines_class);
        map.put("create_time",create_time);
        map.put("create_tim",create_tim);
        return mapper.Drugranking(map);
    }
}
